<?php
class ObjectsController extends Zend_Controller_Action {
	public function indexAction() {
		$objectGameId	= $this->getRequest()->getParam('objectId');
		$mGameObject	= new Application_Model_GameObjects();
		$dGameObject	= $mGameObject->find(array('game_objects.id = ?' => $objectGameId), array('Objects', 'Actions'));
		
		if(empty($dGameObject) === false) {			
			$dChildGameObject = $mGameObject->findall(array('game_objects.parent_objects_id = ?' => $objectGameId), array('Objects'));
						
			$this->view->assign('gameObject', $dGameObject);
			$this->view->assign('childGameObject', $dChildGameObject);
		}
	}
}
?>